package com.xhh.nphm.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xhh.nphm.system.domain.MwfJudgeEty;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface MwfJudgeDao extends BaseMapper<MwfJudgeEty> {
    /**
     * 工单id对应回访记录 列表数据
     * @param wfId
     * @return
     */
    @Select("select PkId as myPkVal,WfId,JudgeIP,convert(varchar(19),VisitTime,20) as visitTime,SpareString,FlagString,VisitPerson,VstDeptName,VstUserName,JudgeN,VstDesc from mWfJudge where WfId=#{wfId} and IsDel=0")
    List<Map<String, Object>> judgeListJson(Integer wfId);

    /**
     * 工单id 对应回访记录数据
     * @param wfId
     * @return
     */
    @Select("select * from mWfJudge where WfId=#{wfId}")
    MwfJudgeEty getByWfId(Integer wfId);
}
